package s15.e06.wraptoruntimeexception;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.management.RuntimeErrorException;

public class Main {
	public static void main(String[] args) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

		String date = "2012-12";
		parse(sdf, date);

		parse(sdf, date);

		parse(sdf, date);

		parse(sdf, date);

	}

	private static void parse(SimpleDateFormat sdf, String date) {
		try {
			sdf.parse(date);
		} catch (ParseException e) {

			throw new RuntimeException(e);
		}
	}

}
